/*
*
* File Name          :  Sound.h
* Description        :  Clock Counter.
*/

#ifndef SOUND_H
#define SOUND_H

#include <stdint.h>
#include "Number.h"

#define SOUND_BUFFER_LENGTH 4*DSP_FFT_SAMPLE_LENGTH
#define SOUND_BUFFER_TYPE int16_t

/*
#define SOUND_BUFFER_TYPE_INT16_T

#ifdef SOUND_BUFFER_TYPE_INT16_T
#define SOUND_BUFFER_TYPE int16_t
#elif defined(SOUND_BUFFER_TYPE_FLOAT)
#define SOUND_BUFFER_TYPE float
#endif
*/

int16_t Sound_Init(void);
NUMBER_TYPE *Sound_Get_AudioBuffer(void);
int32_t Sound_Get_AudioBuffer_Size(void);
int32_t Sound_Position(SOUND_BUFFER_TYPE *dest, const int16_t *src, int32_t destLength, int32_t srcLength, float elevation, float azimuth);
enum MENU_code Sound_FillBuffer(FILEINFO *file_info);
int32_t Sound_Read(int16_t *dest, const int16_t *src, int32_t destLength, int32_t srcLength);
float Sound_GetAzimuth(void);
int32_t Sound_ReadWavFile(FILEINFO *fileInfo, uint8_t *soundBuffer, uint32_t length);
int32_t Sound_Copy(uint8_t *dst, uint8_t *src, int32_t length);
int32_t Sound_Copy_16(int16_t *dst, const int16_t *src, int32_t length);

#endif